/**
 * Created by Administrator on 2018/6/8 0008.
 */
const JWT = require('jsonwebtoken')
const config = require("../config")
const Redis = require('../units/redis')

class Auth {
    static async authToken(req){
        if (req.header.authorization) {
            const token = req.header.authorization
            const RedisToken = await Redis.getVal(token)
           return Object.is(RedisToken,token);
        }
        return false
    }
}
module.exports = Auth;